﻿using DevExpress.Skins;
using HalconDotNet;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ImageToolMatch
{
    [Serializable]
    public class ToolSetting
    {
        public HXLDCont hXLDCont;
        public HRegion regionIgnore;

        public HRegion regionModel;

        public ToolSetting()
        {
            regionIgnore = new HRegion();
            regionIgnore.GenEmptyObj();
            regionModel = new HRegion();
            regionModel.GenEmptyObj();

            NumLevels =6;
            AngleStart = -10;
            AngleEnd = 10;
            AngleStep = 0.0;
            ScaleMin = 0.99;
            ScaleMax = 1.01;
            ScaleStep = 0.0;

            MinContrast = 10;
           
            MinScore = 0.5;
            NumMatches = 1;
            MaxOverlap = 0.5;
            Greediness = 0.8;
            
            RefRow = 0;
            RefCol = 0;
            MarkerXOffSet = 0;
            MarkerYOffSet = 0;
           
            ShowModule = true;
            ShowCross = true;
            hXLDCont=new HXLDCont();
            hXLDCont.GenEmptyObj();

            金字塔最低层 = 2;

        }
        [CategoryAttribute("CreateModel")]
        public int NumLevels
        {
            get;
            set;
        }
        [CategoryAttribute("CreateModel")]
        public double AngleStart
        {
            get;
            set;
        }
        [CategoryAttribute("CreateModel")]
        public double AngleEnd
        {
            get;
            set;
        }
        [CategoryAttribute("CreateModel")]
        public double AngleStep
        {
            get;
            set;
        }
        [CategoryAttribute("CreateModel")]
        public double ScaleMin
        {
            get;
            set;
        }
        [CategoryAttribute("CreateModel")]
        public double ScaleMax
        {
            get;
            set;
        }
        [CategoryAttribute("CreateModel")]
        public double ScaleStep
        {
            get;
            set;
        }
       
        [CategoryAttribute("CreateModel")]
        public int MinContrast
        {
            get;
            set;
        }
      
        
        [CategoryAttribute("SearchModel")]
        public double MinScore
        {
            get;
            set;
        }
        [CategoryAttribute("SearchModel")]
        public int 金字塔最低层
        {
            get;
            set;
        }
        [CategoryAttribute("SearchModel")]
        public int NumMatches
        {
            get;
            set;
        }
        [CategoryAttribute("SearchModel")]
        public double MaxOverlap
        {
            get;
            set;
        }
       
       
        [CategoryAttribute("SearchModel")]
        public double Greediness
        {
            get;
            set;
        }
        [CategoryAttribute("SearchWnd"),Browsable(false)]
        public int SRow1
        {
            get;
            set;
        }
        [CategoryAttribute("SearchWnd"), Browsable(false)]
        public int SRow2
        {
            get;
            set;
        }
        [CategoryAttribute("SearchWnd"), Browsable(false)]
        public int SCol1
        {
            get;
            set;
        }
        [CategoryAttribute("SearchWnd"), Browsable(false)]
        public int SCol2
        {
            get;
            set;
        }
        [CategoryAttribute("Marker")]
        public double RefRow
        {
            get;
            set;
        }
        [CategoryAttribute("Marker")]
        public double RefCol
        {
            get;
            set;
        }
        [CategoryAttribute("Marker")]
        public double MarkerXOffSet
        {
            get;
            set;
        }
        [CategoryAttribute("Marker")]
        public double MarkerYOffSet
        {
            get;
            set;
        }
       
        [CategoryAttribute("UI")]
        public bool ShowModule
        {
            get;
            set;
        }
        [CategoryAttribute("UI")]
        public bool ShowCross
        {
            get;
            set;
        }
    }
}
